GenderType

Represents predefined gender categories.

This enumeration is used throughout the application to classify individuals by gender, typically for purposes such as audience analytics, user profile information, or tailoring content.

It includes an UNKNOWN category to handle cases where gender is not specified, cannot be determined, or is intentionally omitted for privacy.

Conversion methods fromInteger and fromString are provided for interoperability with data sources that use integer codes or string representations for gender.

See also

// Example of where this might be used

Entries

Link copied to clipboard

Represents cases where gender is not specified, cannot be determined, or is intentionally undisclosed. This is often the default value. (Corresponds to integer value 0).

Link copied to clipboard

Represents the female gender. (Corresponds to integer value 1).

Link copied to clipboard

Represents the male gender. (Corresponds to integer value 2).

Properties

Link copied to clipboard
val value: Int

Functions

Link copied to clipboard
open fun fromInteger(x: Int): GenderType
Converts an integer code into the corresponding GenderType enum constant.
Link copied to clipboard
Converts a string representation into the corresponding GenderType enum constant.
Link copied to clipboard
open fun valueOf(name: String): GenderType

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
open fun values(): Array<GenderType>

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.